import os
from multiprocessing import Process
import time, threading

def process_func():
    p("process_func")

from util.console import *
id = os.fork()

if id == 0:
    p("child process",id)

else:
    p("parent,child is ",id)
    p("end")


proc = Process(target=process_func)
proc.start()
proc.join()

lock = threading.Lock()

def thread_func():
    lock.acquire()
    p("thread_func")
    lock.release()

t = threading.Thread(target=thread_func, name='LoopThread')
t.start()
t.join()



